package framework.ia;

import framework.BasicFighter;

import org.newdawn.slick.GameContainer;

public class RandomBrain extends Brain {

	public RandomBrain(BasicFighter fighter) {	
		super(fighter);
		fighter.setXspeed(3);
	}
	
	public void update(GameContainer gc) {
		BasicFighter fighter = getHostFighter();
		if (fighter.getX() <= 500) {
			fighter.setXspeed(3);	
		}
		if (fighter.getX()+fighter.getWidth() >= 900) {
			fighter.setXspeed(-3);	
		}
	}
}
